package com.ahdms.es.bean.enums;

import com.ahdms.es.bean.IAlertAble;

/**
 * @author qinxiang
 * @date 2021-04-23 8:44
 */
public enum VerifyCertCode implements IAlertAble {

    CERT_FORMART_FAIL(4001,"证书数据格式错误"),
    CERT_Algorithm_Invalid(4002,"不支持的公钥参数"),

    Trust_Chain_Fail(4003,"证书信任链验证失败"),
    Vaild_Date_ineffective(4004,"证书有效期验证失败,证书未生效"),
    Vaild_Date_EXPIRED(4005,"证书有效期验证失败,证书已过期"),

    Verify_Revoke_Fail(4006,"证书已被吊销"),
    Verify_KeyUsage_Fail(4007,"证书密钥用法错误"),

    Verify_ROOTCERT_EMPTY(4008,"证书信任链验证失败!颁发者证书获取失败!"),
    CERT_SIGN_Algorithm_Invalid(4009,"证书签名算法不支持!"),
            ;
    VerifyCertCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    private Integer code;

    private String msg;

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return msg;
    }
}
